<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/amazeui.min.css" />
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/hy.admin.css" />
		<style>
			#tooltip{
				position:absolute;
				border:1px solid #ccc;
				background:#333;
				padding:2px;
				display:none;
				color:#fff;
			}
		</style>
	</head>

	<body>
		<div class="am-g">
			{include file='../Common/hy_header.html'}
			<div class="am-u-sm-6">
				{if $info.is_live eq 1}直播帐号{/if}<br/>
				记者头像：<img style="width:50px;" {if $info.reporter_url} src="/ws/{$info.reporter_url}" {else} src="{$_C.hy_path}images/logo2.png" {/if}></img>
				记者名：{$info.reporter_name|default:'暂无'}<br/><br/>
				您的打赏二维码:{if $info.gratuity_url}<a class="tooltip" href="/ws{$info.gratuity_url}" ><img src="/ws{$info.gratuity_url}" width="30px;"></img></a>{else}暂无上传{/if}<br/><br/>
			</div>
			<div class="am-u-sm-6">
				首页缩略图：{if $info.thumb_url}<a class="tooltip" href="/ws{$info.thumb_url}" ><img src="/ws{$info.thumb_url}" width="30px;"></img></a>{else}暂无上传{/if}<br/><br/>
				首页标题：{$info.title|default:"暂无"}<br/><br/>
				首页描述：{$info.home_desc|default:"暂无"}
			</div>
			
			<div class="am-u-md-12 am-cf">
		        <div class="am-fl am-cf">
		          <div class="am-btn-toolbar am-fl">
		             <div class="am-btn-group am-btn-group-xs">
		            	<button data-title="编辑个人信息" data-id="edit_reportInfo" data-href="index.php?g=admin&m=reporter&a=editInfo" class="am-btn am-btn-default am-btn-xs am-text-secondary hy-js-href"><span class="am-icon-plus"></span> 编辑个人信息</button>
				    </div>
				    {if $info.is_live eq 1}
				    
				    {else}
			             <div class="am-btn-group am-btn-group-xs">
			            	<button data-title="新增新闻" data-id="edit_reporternew_" data-href="index.php?g=admin&m=reporter&a=editReporterNew&reporterId={$info.id}" class="am-btn am-btn-default am-btn-xs am-text-secondary hy-js-href"><span class="am-icon-plus"></span> 新增新闻</button>
					    </div>
				    {/if}
				    
		           
		          </div>
		        </div>
		      </div>
	      <div class="am-u-md-3 am-cf">
	        <div class="am-fr">
	        </div>
	      </div>
      <div class="am-u-sm-12">
        <div class="am-form">
          <table class="am-table am-table-striped am-table-hover hy-table-main">
            <thead>
              <tr>
                <th class="table-id">新闻序列</th>
                <th class="table-title">新闻标题</th>
                <th class="table-title">视频外链</th>
                <th >新闻时间</th>
                <th >预览</th>
                <th class="table-title">数据</th>
                <th>操作</th>
              </tr>
          </thead>
          <tbody>
          	 {foreach from=$info.new item=data}
            <tr>
              <td>{if $info.is_live eq 1}直播新闻{else}{if $data.status == 0 }暂不放出{else}序列{$data.status}{/if}{/if} </td>
              <td><div style="width:100px;word-wrap: break-word;">{$data.title}</div></td>
              <td><div style="width:250px;word-wrap: break-word;">{$data.video_url|default:'无外链'}</div></td>
              <td>{$data.createtime|date_format:"Y-m-d H:i:s"}</td>
              <td><a class="tooltip" href="{$data.preview_url}" ><img src="{$data.preview_url}" width="30px;"></img></a></td>
              <td>点赞数：{$data.like_num|default:'0'}<br/>评论数：{$data.comment_num|default:'0'}</td>
              <td>
              	<button data-id="edit_reporternew_{$data.id}" data-title="新闻编辑-{$data.titile}" data-href="index.php?g=admin&m=reporter&a=editReporterNew&id={$data.id}&reporterId={$info.id}" class="am-btn am-btn-default am-btn-xs am-text-secondary hy-js-href"><span class="am-icon-pencil-square-o"></span> 编辑</button>
              	<button data-title="{$data.title}" data-id="reporter_comment_{$data.id}" data-href="index.php?g=admin&m=reporter&a=newCommentList&new_id={$data.id}" class="am-btn am-btn-default am-btn-xs am-text-secondary hy-js-href"><span class="am-icon-pencil-square-o"></span> 评论</button>
              	
              </td>
            </tr>
             {/foreach} 
          </tbody>
        </table>
          <div class="am-cf">
</div>
          <hr />
      
        </div>
      </div>

    </div>
		{include file='../Common/hy_footer.html'}
		<script type="text/javascript">
		$(function(){
			var x = 10;
			var y = 20;
			$("a.tooltip").mouseover(function(e){
				this.myTitle = this.title;
				this.title = "";
				var imgTitle = this.myTitle? "<br/>" + this.myTitle : "";
				var tooltip = "<div id='tooltip'><img style='width:250px;' src='"+ this.href +"' alt='图片'/>"+imgTitle+"<\/div>"; //创建 div 元素
				$("body").append(tooltip);	//把它追加到文档中
				$("#tooltip")
					.css({
						"top": (e.pageY+y) + "px",
						"left":  (e.pageX+x)  + "px"
					}).show("fast");	  //设置x坐标和y坐标，并且显示
		    }).mouseout(function(){
				this.title = this.myTitle;
				$("#tooltip").remove();	 //移除
		    }).mousemove(function(e){
				$("#tooltip")
					.css({
						"top": (e.pageY+y) + "px",
						"left":  (e.pageX+x)  + "px"
					});
			});
		})
		</script>
	</body>

</html>